package com.aurora.demo.repository;

import com.aurora.demo.entity.Image;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface ImageRepository extends MongoRepository<Image, String> {

    @Query("{ 'name' : ?0 }" )
    Image findByName(String name);
}
